package zero.tech.games.gate.service;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import zero.tech.core.data.Resp;
import zero.tech.core.data.SimpleUser;
import zero.tech.games.common.Code;
import zero.tech.games.gate.data.res.ResExtensionReward;
import zero.tech.games.gate.hot.ExtensionUtil;
import zero.tech.games.gate.service.api.IExtensionService;

@Service
public class ExtensionServiceImpl implements IExtensionService{

	@Autowired
	private ExtensionUtil extensionUtil;

	@Override
	public Resp extensionReward(SimpleUser simpleUser, int club_id, Date begin, Date end) {
		ResExtensionReward res=extensionUtil.extensionReward(simpleUser,club_id,begin,end);
		return Resp.build(Code.OK, "查询成功",res);
	}

	@Override
	@Transactional
	public Resp extensionRewardGet(SimpleUser simpleUser, int club_id, long gold) {
		return extensionUtil.extensionRewardGet(simpleUser,club_id,gold);
	}

}
